import React, { useEffect, useState } from 'react'
import axios from 'axios'

useGetPost = () => {
	const [post, setPost] = useState
	useEffect(() => {
		axios.get('url').then((res) => setPost(res.data))
	}, [])
	return [post, setPost]
}

const APP = () => {
	const [post, setPost] = useGetPost()
	return (
		<div>
			<div>自定义hook函数</div>
		</div>
	)
}

export default APP
